﻿using RayDen.RayEngine.Core;
using Path = 
//RayDen.RayEngine.Engines.XP.HeroWavelengthPathSampler;
RayDen.RayEngine.Engines.XP.SingleWavelengthPathSampler;

namespace RayDen.RayEngine.Engines.XP
{
    public class HWPathBuffer : PathBuffer<Path>
    {
        private SpectralSamplingHelper wlSampler;

        public HWPathBuffer() { }

        public HWPathBuffer(int maxPaths, RayEngineScene scene, ImageFilmBase agg, SamplingContext sc) : base(maxPaths, scene, agg, sc)
        {
            wlSampler = new SpectralSamplingHelper(scene);            
        }

        protected override PathSamplerBase CreatePathSampler()
        {
            if (this.wlSampler == null)
            {
                wlSampler = new SpectralSamplingHelper(this.Scene);
            }
            var pt = (Path)base.CreatePathSampler();
            pt.wlSampler = this.wlSampler;
            return pt;
        }
    }
}